Rate Shopping
Rate Shopping
POST | /v1/open-api/rate |
Header
Label | Required | Description |
---|---|---|
Api-Key | ✓ | Api Key, please log in to the system and find it in My Profile |
Api-Secret | ✓ | Api Secret, please log in to the system and find it in My Profile |
Entity Types
The address recognition API is currently designed to recognize the following types of entities:
Parameter | Type | Required | Description |
---|---|---|---|
shipment | [object] | ✓ | - |
﹂carrier | [string] | Carrier Name Example: ups,fedex | |
﹂service_code | [string] | Indicate the carrier service type used for this shipment.Click here to see Service Types Example:ups_ground | |
﹂ship_from | [object] | - | |
﹂﹂uuid | [array] | Address unique id.If you want to improve the accuracy of the ship from address, you can choose to send only uuid. Click to see how to get uuid. Example:22d953b7-24c4-4ae9-afb4-111cc227b01e | |
﹂﹂postal_code | [string] | ✓ | Format [xxxxx] or [xxxxx-xxxx] Example:90045-6275 |
﹂﹂country_code | [string] | ✓ | This is the two-letter country code. Example:US |
﹂﹂state_province_code | [string] | ✓ | This is the two-letter state code. Example:CA |
﹂﹂is_residential | [boolean] | Indicate whether this address is residential (as opposed to commercial). Example:false | |
﹂﹂addresses | [array] | This is the combination of number, street name, etc. Maximum length per line is 35.Note:At least one line is required. Example:6925 Riverview Ave | |
﹂﹂city | [string] | ✓ | City Name. Example:LOS ANGELES |
﹂﹂name | [string] | Specify the shipper name.Maximum length is 35 characters. Example:Amazon | |
﹂﹂phone | [string] | Specify the shipper phone number. At least 10 digits. Example:1000000000 | |
﹂﹂attention | [string] | ✓ | Note.Maximum length is 35 characters. Example:Ann |
﹂ship_to | [object] | ✓ | - |
﹂﹂addresses | [array] | This is the combination of number, street name, etc. Maximum length per line is 35.Note:At least one line is required. Example:6925 Riverview Ave | |
﹂﹂city | [string] | ✓ | City Name. Example: PENFIELD |
﹂﹂state_province_code | [string] | ✓ | This is the two-letter state code. Example:NY |
﹂﹂postal_code | [string] | ✓ | Format :[xxxxx] or [xxxxx-xxxx] Example:14526 |
﹂﹂country_code | [string] | ✓ | This is the two-letter country code. Example:US |
﹂﹂name | [string] | Specify the recipient name.Maximum length is 35 characters. Example:Ann | |
﹂﹂phone | [string] | Specify the recipient phone number. At least 10 digits. Example:(999)-999-9999 | |
﹂﹂phone_ext | [string] | Maximum length is 4 characters. Example:1234 | |
﹂﹂is_residential | [boolean] | Indicate whether this address is residential (as opposed to commercial) Example:false | |
﹂﹂attention | [string] | Note.Maximum length is 35 characters. Example:Ann | |
﹂packages | [array] | ✓ | |
﹂﹂dimension | [object] | ✓ | Indicate the dimensions of the package. Note: The maximum/minimum dimension values varies based on the services and the packaging types. |
﹂﹂﹂width | [number] | ✓ | Indicate the width of the package. This value allows 2 explicit decimal position. Example:20.01 |
﹂﹂﹂height | [number] | ✓ | Indicate the height of the package. This value allows 2 explicit decimal position. Example:20.01 |
﹂﹂﹂length | [number] | ✓ | Indicate the length of the package. This value allows 2 explicit decimal position. Example:20.01 |
﹂﹂﹂code | [string] | ✓ | Indicate the Unit of measure for the provided dimensions. Valid Values are:in/cm Example:in |
﹂﹂weight | [object] | ✓ | Indicate the weight of the package. |
﹂﹂﹂code | [string] | ✓ | This is the package weight unit. Valid Values are:lb/oz/g/kg Example:lb |
﹂﹂﹂value | [number] | ✓ | This value allows 2 explicit decimal position. Example:68.25 |
﹂﹂insurance | [object] | Indicate the insurance | |
﹂﹂﹂code | [string] | This is the currency code for the amount. Example:USD | |
﹂﹂﹂value | [number] | This value allows 2 explicit decimal position. Example:300.01 | |
﹂﹂confirmation | [string] | ✓ | Indicate the Signature Type.Click here to see the confirmation supported by the service provider. Example:Adult |
﹂﹂quantity | [number] | ✓ | Package quantity Example:1 |
﹂package_type | [object] | ✓ | Specify the packaging used.Click here to see Package Types. |
﹂﹂type | [string] | ✓ | Example:common |
﹂﹂name | [string] | ✓ | Example:Package |
﹂pickup_date | [string] | ✓ | This is the shipment date. Format :[yyyymmdd] Example:20221001 |
curl -X POST \
'https://api.sandbox.shipber.com/v1/open-api/rate' \
-H 'Content-Type:application/json' \
-H 'Api-Key:2cn1wgmfidytin3jef3b' \
-H 'Api-Secret:qRBYybjRch7BdTxO5NTyGUd6mBvowNbsjahnAnpdI-BXc5sCrRt15XGr-hc9oY7C' \
-d '{
"shipment": {
"ship_from": {
"uuid": "7b572b8d-08a3-4cc7-a711-1aae28e9ffcf"
},
"ship_to": {
"city": "Penfield",
"state_province_code": "NY",
"postal_code": "14526",
"country_code": "US"
},
"packages": [
{
"dimension": {
"width": 10,
"height": 10,
"length": 10,
"code": "IN"
},
"weight": {
"code": "lb",
"value": 20
},
"confirmation": "None",
"quantity": 1
}
],
"package_type": {
"type": "common",
"name": "Package"
},
"pickup_date": "20211010"
}
}'
{
"data": {
"rates": [{
"charge": {
"code": "USD",
"value": 10.03
},
"estimate_ship_time": {
"delivery_time_to_tz": "2021-04-15T23:00:00-07:00",
"delivery_time_from_tz": "2021-04-15T23:00:00-07:00",
"days": 1
},
"carrier": "ups",
"service_code": "ups_ground",
"service_name": "UPS® Ground",
"carrier_service": "UPS® Ground",
"account_alias": "CO:Xu3GDZ5iu_",
"rate_id": "eyJjaGFpbklkIjo0MzMsInNlcnZpY2VDb2RlIjoidXBzX2dyb3VuZCJ9"
}]
}
}